package ipdesk.model.analysis.dao;

import ipdesk.model.analysis.bean.AnalysisPromoteBean;
import ipdesk.model.analysis.bean.AnalysisSeminarBean;

import java.util.List;
import java.util.Map;

import com.ibatis.dao.client.DaoManager;
import com.ibatis.dao.client.template.SqlMapDaoTemplate;
import com.opensymphony.xwork2.ActionContext;

public class AnalysisPromoteImpl extends SqlMapDaoTemplate implements IAnalysisPromote {

	ActionContext context = ActionContext.getContext();
	Map<String, String> session = (Map<String, String>)context.getSession();
	
	public AnalysisPromoteImpl(DaoManager daoManager) {
		super(daoManager);
	}

	public List<AnalysisPromoteBean> getYears(){
		
		List<AnalysisPromoteBean> getYears = this.queryForList("promote.getYears");
		
		return getYears;
	}

	public List<AnalysisPromoteBean> getAnalysisPromoteList(String selectedYear) {
		List<AnalysisPromoteBean> analysisPromoteList = this.queryForList("promote.getAnalysisPromoteList", selectedYear);
		return analysisPromoteList;
	}

	public List<AnalysisPromoteBean> getAnalysisPromoteListByMonth(AnalysisPromoteBean analysisPromoteBean) {
		List<AnalysisPromoteBean> analysisPromoteListByMonth = this.queryForList("promote.getAnalysisPromoteListByMonth", analysisPromoteBean);
		return analysisPromoteListByMonth;
	}
}
